package com.web.webrecive.utils;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class LoginServlet extends HttpServlet {
	//???doGet????
	public void doGet(HttpServletRequest request,
            HttpServletResponse response)
     throws ServletException,
            IOException {
		String username = request.getParameter("username");   
		String password = request.getParameter("password");      
		
		//?????????????
		//System.out.println("username=" + username);
		//System.out.println("password=" + password);
		//?????????
		response.setContentType("text/html;charset=GB18030");
		
		//????html???
		response.getWriter().println("<html>");
		response.getWriter().println("<head>");	
		response.getWriter().println("<title>??????</title>");	
		response.getWriter().println("</head>");	
		response.getWriter().println("<body>");	
		response.getWriter().println("?????" + username + "?????????????????");	
		response.getWriter().println("</body>");	
		response.getWriter().println("</html>");
		}                 	
	//???doPost????
	public void doPost(HttpServletRequest request,
            HttpServletResponse response)
    throws ServletException,
            IOException {
		doGet(request, response);               	
	}     
}
